<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class WechatUserPrivacy extends Model
{
    protected $table = 'wechat_user_privacy';
    protected $hidden = ['updated_at', 'created_at'];

    public function statusArray($status = null)
    {
        $arr = [
            0 => "取消",
            10 => "隐藏",
            20 => "发布",
        ];
        if ($status !== null) {
            return array_key_exists($status, $arr) ? $arr[$status] : $arr['0'];
        }
        return $arr;
    }
}
